/*
 * @Author: zhouwr 1551541860@qq.com
 * @Date: 2024-03-03 21:59:21
 * @LastEditors: zhouwr 1551541860@qq.com
 * @LastEditTime: 2024-03-03 22:03:49
 * @FilePath: /jeecgboot-vue3/src/components/Bpmn/src/hooks/useModalContext.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { InjectionKey } from 'vue';
import { createContext, useContext } from '/@/hooks/core/useContext';

export interface ModalContextProps {
  redoModalHeight: () => void;
}

const key: InjectionKey<ModalContextProps> = Symbol();

export function createModalContext(context: ModalContextProps) {
  return createContext<ModalContextProps>(context, key);
}

export function useModalContext() {
  return useContext<ModalContextProps>(key);
}
